30 research outputs found

    CRSX - Combinatory Reduction Systems with Extensions

    Get PDF
    Combinatory Reduction Systems with Extensions (CRSX) is a system available from http://crsx.sourceforge.net and characterized by the following properties: - Higher-order rewriting engine based on pure Combinatory Reduction Systems with full strong reduction (but no specified reduction strategy). - Rule and term syntax based on lambda-calculus and term rewriting conventions including Unicode support. - Strict checking and declaration requirements to avoid idiosyncratic errors in rewrite rules. - Interpreter is implemented in Java 5 and usable stand-alone as well as from an Eclipse plugin (under development). - Includes a custom parser generator (front-end to JavaCC parser generator) designed to ease parsing directly into higher-order abstract syntax (as well as permitting the use of custom syntax in rules files). - Experimental (and evolving) sort system to help rule management. - Compiler from (well-sorted deterministic subset of) CRSX to stand-alone C code

    Normalization by Evaluation with Typed Abstract Syntax

    Get PDF
    We present a simple way to implement typed abstract syntax for thelambda calculus in Haskell, using phantom types, and we specify normalization by evaluation (i.e., type-directed partial evaluation) to yield thistyped abstract syntax. Proving that normalization by evaluation preserves types and yields normal forms then reduces to type-checking thespecification

    Higher-order Rewriting for Executable Compiler Specifications

    Get PDF
    In this paper we outline how a simple compiler can be completely specified using higher order rewriting in all stages: parsing, analysis/optimization, and code emission, specifically using the crsx.sf.net system for a small declarative language called "X" inspired by XQuery (for which we are building a production quality compiler in the same way)

    Modeling, Sharing, and Recursion for Weak Reduction Strategies using Explicit Substitution

    Get PDF
    We present the lambda sigma^a_w calculus, a formal synthesis of the concepts ofsharing and explicit substitution for weak reduction. We show howlambda sigma^a_w can be used as a foundation of implementations of functionalprogramming languages by modelling the essential ingredients of suchimplementations, namely weak reduction strategies, recursion, spaceleaks, recursive data structures, and parallel evaluation, in a uniform way.First, we give a precise account of the major reduction strategiesused in functional programming and the consequences of choosing lambda-graph-reduction vs. environment-based evaluation. Second, we showhow to add constructors and explicit recursion to give a precise accountof recursive functions and data structures even with respect tospace complexity. Third, we formalize the notion of space leaks in lambda sigma^a_wand use this to define a space leak free calculus; this suggests optimisationsfor call-by-need reduction that prevent space leaking and enablesus to prove that the "trimming" performed by the STG machine doesnot leak space.In summary we give a formal account of several implementationtechniques used by state of the art implementations of functional programminglanguages.Keywords. Implementation of functional programming, lambdacalculus, weak reduction, explicit substitution, sharing, recursion, spaceleaks

    Modeling Sharing and Recursion for Weak Reduction Strategies using Explicit Substitution

    Get PDF
    Projet EURECAWe \emph{present} the λσwa\lambda\sigma_w^a-calculus, a formal synthesis of the concepts of sharing and explicit substitution for weak reduction. We show how λσwa\lambda\sigma_w^a can be used as a foundation of implementations of functional programming languages by modeling the essential ingredients of such implementations, namely \emph{weak reduction strategies}, \emph{recursion}, \emph{space leaks}, \emph{recursive data structures}, and \emph{parallel evaluation}, in a uniform way. First, we give a precise account of the major reduction strategies used in functional programming and the consequences of choosing λ\lambda-graph-reduction vs. environment-based evaluation. Second, we show how to add \emph{constructors and explicit recursion} to give a precise account of recursive functions and data structures even with respect to space complexity. Third, we formalize the notion of \emph{space leaks} in λσwa\lambda\sigma_w^a and use this to define a space leak free calculus; this suggests optimisations for call-by-need reduction that prevent space leaking and enables us to prove that the «trimming» performed by the STG machine does not leak space. In summary we give a formal account of several implementation techniques used by state of the art implementations of functional programming languages

    Explicit Cyclic Substitution

    No full text
    The untyped lambda-calculus enriched with local possibly recursive definitions, e.g., let and letrec of functional programming languages, is discussed. It is shown how it may be modeled using conditional term rewriting systems defining "explicit acyclic and cyclic substitution" calculi that generalise the explicit substitution calculus of Abadi, Cardelli, Curien, and Lévy [1] in two directions: the systems model traditional lambda-calculus with variables (thus not restricted to closed terms), and the cyclic calculus may model recursion directly

    Lightweight Bytecode Verification

    No full text
    Presents the idea of Java "Lightweight Bytecode Verification" (LBV) that stages Java Bytecode Verification (BV) into two phases: a "certification" phase that includes BV and can be performed at any time, and a "lightweight verification" phase that reproves the BV efficiently based on the certificate and the code

    Higher-order rewriting and partial evaluation

    No full text
    Reproduction of all or part of this work is permitted for educational or research use on condition that this copyright notice is included in any copy. See back inner page for a list of recent BRICS Report Series publications. Copies may be obtained by contacting: BRIC

    On Explicit Binding and Substitution Preserving Strong Normalisation (Extended Abstract)

    No full text
    In recent years a large number of `explicit substitution calculi' have been proposed with various combinations of properties. One property that has attracted special attention is `PSN:' whether the set of fi-strongly normalising terms is still strongly normalising with explicit substitution. Several calculi with this property have been found: we discuss AE, Ø, s, t, and x; in this note we add two new variants: AE1 and AE0. We show that these calculi all have essentially the same reductions, or put differently: the renaming overhead is negligible with respect to normalisation. Furthermore x -- the only one of the lot with implicit binding using usual -calculus variables -- is a least common denominator in the sense that all the others are (strict) conservative extensions of it. A consequence of this is that all the PSN results proven for these calculi are equivalent (and follow from PSN for x)
    corecore